﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using Main.Transport;
using Main.Reseau;
using System.Threading;

namespace Main
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.SetWindowSize(200, 40);
            CoucheTransport coucheTransport = new CoucheTransport();
            Thread threadTransportVersReseau = new Thread(coucheTransport.EcrireVersReseau);
            Thread threadLireDeReseau = new Thread(coucheTransport.LireDeReseau);

            CoucheReseau coucheReseau = new CoucheReseau();
            Thread threadLireDeTransport = new Thread(coucheReseau.LireDeTransport);
            Thread threadEcrireVersTransport = new Thread(coucheReseau.EcrireVersTransport);

            // Demarrage des threads
            threadTransportVersReseau.Start();
            threadLireDeTransport.Start();
            threadEcrireVersTransport.Start();
            threadLireDeReseau.Start();


            threadTransportVersReseau.Join();


            //threadReseau.Join();

            //threadTransportVersReseau.Join();
        }
    }
}
